<?php


namespace app\api\validate;


use think\Validate;

class MemberValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name' => ['require'],
        'mobile' => ['require'],
        'birthplace' => ['require'],
        'picture' => [''],
        'level_id' => ['require'],
        'company_post' => [''],
        'society_post' => [''],
        'introduction' => [''],
        'cat_id' => ['require'],
        'company_name' => ['require'],
        'company_logo' => [''],
        'company_introduce' => ['require'],
        'company_product' => ['require'],
        'company_mobile' => [''],
        'company_address' => ['require'],
        'company_address_detail' => ['require'],
        'company_address_lng' => ['require'],
        'company_address_lat' => ['require'],
        'company_site' => [''],
        'company_email' => [''],
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'editMemberAndUnitInfo'  => ['name','mobile','birthplace','level_id','cat_id','company_name','company_introduce','company_product','company_address','company_address_detail','company_address_lng','company_address_lat'],
    ];


    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'name' => '会员姓名',
            'mobile' => '联系电话',
            'birthplace' => '会员籍贯',
            'picture' => '会员照片',
            'level_id' => '商会职务',
            'company_post' => '公司职务',
            'society_post' => '社会职务',
            'introduction' => '会员简介',
            'cat_id' => '行业分类',
            'company_name' => '公司名称',
            'company_logo' => '公司LOGO',
            'company_introduce' => '公司介绍',
            'company_product' => '公司产品',
            'company_mobile' => '公司电话',
            'company_address' => '公司地址',
            'company_address_detail' => '公司详细地址',
            'company_address_lng' => '公司地址经纬度',
            'company_address_lat' => '公司地址经纬度',
            'company_site' => '公司网址',
            'company_email' => '公司邮箱',
        ];
        parent::__construct($rules, $message, $field);
    }

}